<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="<?=$views_home;?>css/base.css"/>
		<style>
		/*****************发帖框******************************************/
			.public{
				width:970px;
				margin:0 auto;
				background:#fff;
			}
		/*****************左边框******************************************/
			.public_left{
				width:170px;
				background:#fff;
				border:1px #ccc solid;
				float: left;
			}
			.public_left_head{
				width:168px;
				height:50px;
				background: #eff4f7;
				font-weight: bold;
				font-size: 16px;
				line-height: 50px;
				border-bottom:solid #ccc 1px;

			}
			.public_big{
				width:168px;
				height:40px;
				background: #eff4f7;
				border-bottom:solid #ccc 1px;
				line-height: 40px;
			

			}
			
			.public_class{
				width:168px;
				height:30px;
				background: #eff4f7;
				border-bottom:dashed #ccc 1px;
				line-height: 30px;
			}
		/*****************右边框******************************************/
			.public_right{
				width: 778px;
				background: #fff;
				margin-left: 18px;
				float: left;
			}
			.public_right_head{
				width:758px;
				border:1px #ccc solid;
				margin:0 auto;

			}
			
			.public_right_head_top{
				width:758px;
				height:50px;
				background: #fff;
			}
			.public_right_head_top_li_1{
				font-size: bold; 
				font-size: 16px; 
				float:left;
				line-height:50px;
				margin-left: 20px;
			}
			.public_right_head_top_li_2{
				float:left;
				margin-top: 19px;
				margin-left:10px;
			}
			.public_right_head_top_li_3{
				
				float:left;
				margin-top: 19px;
				margin-left:10px;
				padding-left:10px;
				border-left:1px #ccc solid; 
			}
			.public_right_head_bottom{
				width: 738px;
				height:30px;
				background: #fff;

				padding-left:20px;
			}
			
			.public_right_button_1{
				width: 778px;
				height:55px;
				margin: 0 auto;
				
			}
			.public_right_button_1_put1{
				width: 60px;
				height:35px;
				float:left;
				margin-left:20px;
				margin-top:10px;
				color: #fff;
				background: #7B68EE;
			}
			.public_right_button_1_put2{
				width: 55px;
				height:30px;
				float:left;
				margin-left:620px;
				margin-top:15px;
				color: #fff;
				background: #7B68EE;
			}
		/****************发帖主体 main 部分开始 **********************/
			.public_right_main{
				width: 778px;
				margin:0 auto;
				border:1px #ccc solid;
				background: #fff;

			}

			.public_right_main_head{
				width: 778px;
				height:45px;
				margin:0 auto;
				
				background: #eff4f7;

			}
			.public_right_main_head_p1{
				float:left;
				font-size: 14px;
				margin-left:10px;
				margin-top:15px;
			}
			.public_right_main_head_p1_a2{
				border-left:1px #ccc solid;
				margin-left:10px;
				padding-left:10px; 
			}
			.public_right_main_head_p2{
				float:left;
				font-size: 14px;
				margin-left:240px;
				margin-top:15px;
			}
			.public_right_main_head_p3{
				float:left;
				font-size: 14px;
				margin-left:120px;
				margin-top:15px;
			}
			.public_right_main_head_p4{
				float:left;
				font-size: 14px;
				margin-left:70px;
				margin-top:15px;
			}
			.public_right_main_tiezi{
				width: 778px;
				height:40px;
				margin:0 auto;
				background: pink;

			}
			.public_right_main_li{
				width:778px;
				height:40px;
				background: #fff;
				margin-top:10px;
			}
			.public_right_main_li:hover{
				background:#eff4f7;
			}
			.public_right_main_li_p0{
		
				width:280px;
				margin-left:20px;
				float:left;
			
			}
			.public_right_main_li_p1,.public_right_main_li_p3{
				width:120px;
				float:left;
				margin-left:70px;
				
			}
			.public_right_main_li_p2{
				width:40px;
				float:left;
				margin-left:40px;
				
			}
		/****************发帖主体 main 部分结束***********************/

			.public_right_button_2{
				width: 778px;
				height:55px;
				margin: 0 auto;
				
				
			}
			.public_right_button_2_put1{
				width: 60px;
				height:35px;
				float:left;
				margin-left:20px;
				margin-top:10px;
				color: #fff;
				background: #7B68EE;
			}
			.public_right_button_2_put2{
				width: 55px;
				height:30px;
				float:left;
				margin-left:620px;
				margin-top:10px;
				color: #fff;
				background: #7B68EE;
			}

			/**************** 底部 分页 ********************/
			.public_right_bottom{
				width:778px;
				height:30px;
				
			}
			.public_right_bottom_put1{
				width:20px;
				float: left;
				margin-left: 130px;

			}
			.public_right_bottom_put2{
			
				float: left;
			}
			.public_right_bottom_p{
				width:;
				float: left;
			}
			.public_right_bottom_p a,.public_right_bottom_p span{
				margin-left: 15px;
			}

		/*****************结束******************************************/
		</style>
	</head>
	<body>
		<div class="public  clearFix">
			<!--   左边框  开始-->
			
			<div class="public_left">
				<div class="public_left_head">&nbsp;&nbsp;&nbsp;版块导航</div>
		

	<!-- ************************************* -->
				<?php if($data_big):?>
				<?php foreach($data_big as $k_big => $v_big):?>
				
				<?php if($v_big['parentid'] == 0):?>
				<div class="public_big">
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=$v_big['classname'];?>
				</div>
				<?php endif;?>

				<?php foreach($data_big as $k => $v):?>

				<?php if($v_big['cid'] == $v['parentid']):?>
				<div class="public_class">
					<a href="<?=$web_site;?>public.php?classid=<?=$v['cid'];?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=$v['classname'];?></a>
				</div>
				<?php endif;?>

				<?php endforeach;?>

				<?php endforeach;?>
				<?php endif;?>
			</div>
			

			<!--   左边框  结束-->

			<!--   右边框  开始-->
			<?php if($data4):?>
				<?php foreach($data4 as $k4 => $v4):?>
			<div class="public_right">
			
				<div class="public_right_head">
					
					<ul class="public_right_head_top clearFix">
					
						<li class="public_right_head_top_li_1"><a href="<?=$web_site;?>public.php?classid=<?=$_GET['classid'];?>"><?=$v4['classname'];?></a></li>
					
						<li class="public_right_head_top_li_2">今日：<?=$today_count=isset($today_count)?$today_count:0;?></li>
						
						<li class="public_right_head_top_li_3">主题：<?=$total;?></li>
					
					</ul>
				
					<p class="public_right_head_bottom">版主:<?=$v4['compere'];?></p>
					
				</div>
				
				<div class="public_right_button_1 clearFix">
					<a href="<?=$web_site;?>post.php?classid=<?=$v4['cid'];?>">
						<input class="public_right_button_1_put1" type="submit" value="发帖">
					</a>
					<a href="<?=$web_site;?>index.php?classid=<?=$v4['cid'];?>">
						<input class="public_right_button_1_put2" type="submit" value="返回">
					</a>
				</div>
				
				<!--  	发帖主体 main 部分开始  -->
				<div class="public_right_main">
					<div class="public_right_main_head  clearFix">
						<p class="public_right_main_head_p1">
							筛选：<a href="<?=$web_site;?>public.php?classid=<?=$v4['cid'];?>">全部</a>
							<a class="public_right_main_head_p1_a2" href="<?=$web_site;?>public.php?classid=<?=$v4['cid'];?>&elite=1">精华</a>
						</p>
						<p class="public_right_main_head_p2">作者</p>
						<p class="public_right_main_head_p3">回复/查看</p>
						<p class="public_right_main_head_p4">最后发表</p>
					</div>
			
					<!--  保证页面不超出现有总数  -->
					<?php if($res):?>    
				
					<?php foreach($res as $k => $v):?>
					
					<ul class="public_right_main_ul">
						<li class="public_right_main_li clearFix">
							<p class="public_right_main_li_p0"><a href="<?=$admin_2;?>admin_cg_post_buy.php?id=<?=$v['id'];?>" <?php if($v['ishot'] == 1):?> style="color:red;" <?php endif;?>><?=$v['title']=isset($v['title'])?$v['title']:null;?>【售价 <?=$v['rate'];?> 金币】<?php if($v['elite'] == 1):?><img src="<?=$views_home;?>image/digest_1.gif" title="精华帖"><?php endif;?> </a></p>
							
							
							<p class="public_right_main_li_p1">
							<?=$result[0]['username'];?>/<?=$addtime=date('Y-m-d',$v['addtime']);?></p>
							<p class="public_right_main_li_p2"><?=$v['replycount'];?>/<?=$v['hits'];?></p>

							<p class="public_right_main_li_p3"><?=$addtime=date('Y-m-d H:i:s',$v['addtime']);?></p>
	<!--	<?=$birthday=isset($v['birthday'])?date('Y-m-d',$v['birthday']==0?0:				$v['birthday']):null;?>
	-->					
						</li>
					</ul>
				
					<?php endforeach;?>
					<?php endif;?>
					

				</div>
				
				<!--  	发帖主体 main 部分结束-->
				
				<div class="public_right_button_2 clearFix">
					<a href="<?=$web_site;?>post.php?classid=<?=$v4['cid'];?>">
						<input class="public_right_button_2_put1" type="submit" value="发帖">
					</a>	
					<a href="<?=$web_site;?>index.php?classid=<?=$v4['cid'];?>">
						<input class="public_right_button_2_put2" type="submit" value="返回">
					</a>	

				</div>
				

				<div class="public_right_bottom clearFix">
			
					<form action="<?=$web_site;?>public.php?page=<?=$page;?>&classid=<?=$v4['cid'];?>" method="get" enctype="multipart/form-data">
						<input type="hidden" name="classid" value="<?=$v4['cid'];?>">
						<input class="public_right_bottom_put1" type="text" value="<?=$page;?>"  name="page">
			
				<!-- <?=$page=($page>$pageTotal)?$pageTotal:$page;?> -->

						
							<input class="public_right_bottom_put2" type="submit" value="GO">
						
					</form>
					<p class="public_right_bottom_p">
						<a href="<?=$web_site;?>public.php?page=1&classid=<?=$v4['cid'];?>">首页</a>
						<a href="<?=$web_site;?>public.php?page=<?=$prev;?>&classid=<?=$v4['cid'];?>">上一页</a>
						<a href="<?=$web_site;?>public.php?page=<?=$next;?>&classid=<?=$v4['cid'];?>">下一页</a>
						<a href="<?=$web_site;?>public.php?page=<?=$pageTotal;?>&classid=<?=$v4['cid'];?>">尾页</a>
						<span>共有<?=$total;?>条记录</span>
						<span>每页显示<?=$num;?>条</span>
						<span>本页显示<?=$offset+1;?>-<?=$offset+$num;?>条</span>
						<span><?=$page;?>/<?=$pageTotal;?>页</span>
					</p>
				</div>
				<?php endforeach;?>
				<?php endif;?>
			</div>	



			<!--   右边框  结束-->
		</div>

	</body>
</html>